
import styles from './styles.module.scss'
import RenderJudge from '../RenderJudge'
import ArrowRight from '@/assets/arrow_right.png'
import classNames from 'classnames'
import Link from 'next/link'
const Title = ({ img, text, className, hasRight, more }) => (
  <section className={styles.titles}>
    <nav className={classNames(className, styles.textinfo)}>
      <img src={img?.src} alt="" />
      <span>{text}</span>
    </nav>
    <RenderJudge value={hasRight} active={
      <Link href={more}>
        <a className={styles.lookMore}>
          <p>查看更多</p>
          <img src={ArrowRight.src} alt="" />
        </a>
      </Link>
    } />
  </section>
)

Title.defaultProps = {
  more: "/"
}

export default Title